﻿using System;
using Microsoft.Xna.Framework.Input;

namespace WindowsGame.Input
{
	/// <summary>
	/// WorkInputFactory is responsible for managing Windows PC input.
	/// </summary>
	public class WorkInputFactory : AInputFactory
	{
		public override Single Rotate()
		{
			Single movement = 0;
			if (Keyboard.GetState().IsKeyDown(Keys.Left))
			{
				movement = -1;
			}
			else if (Keyboard.GetState().IsKeyDown(Keys.Right))
			{
				movement = 1;
			}

			return movement;
		}

		public override Single Move()
		{
			Single acceleration = 0;
			if (Keyboard.GetState().IsKeyDown(Keys.Space))
			{
				acceleration = 1;
			}

			return acceleration;
		}

		public override Boolean Warp()
		{
			return Keyboard.GetState().IsKeyDown(Keys.Enter);
		}
	}
}